import { Setting } from './setting';

export class SettingUrl {
  // Api
  static URL: any = {
    login: {
      furtherLogin: '/login/signin.shtml'
    },
    bind: '/login/bind.shtml',
    localApi: {
      battery: (deviceIp: string) => `http://${deviceIp}/api/battery/`,
      start: (deviceIp: string) => `http://${deviceIp}/api/exec/`,
      socket: (deviceIp: string) => `ws://${deviceIp}/ws/exec`,
    },
    furtherApi: {
      loadProjectsDataFromFurther: (projectVersionId: string, accessToken: string) => `${Setting.furtherBackendUrl}/api/v3/ProjectVersions/${projectVersionId}/webide?access_token=${accessToken}`,
      createFile: (projectVersionId: string, accessToken: string) => `${Setting.furtherBackendUrl}/api/v3/projectVersions/${projectVersionId}/code?access_token=${accessToken}`,
      updateFile: (projectVersionId: string, accessToken: string, id: string | number) => `${Setting.furtherBackendUrl}/api/v3/projectVersions/${projectVersionId}/code/${id}?access_token=${accessToken}`
    },
  };


  // page router links
  static ROUTERLINK: any = {
    ide: '/ide'
  };
}
